﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BOHVote.Common;
using BOHVote.Entity;
 

namespace BOH.Interview
{
    public partial class InterViwe : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.Title = common.getAppSetting("AppName");
                ((HiddenField)this.Master.FindControl("hiddenPageName")).Value = "IV";
                if (Session["User"] != null)
                {
                    BHUser user = (BHUser)Session["User"];
                    SetVisible(user.RightType);
                }
            }
        }

        protected void SetVisible(string UserType)
        {
            switch (UserType)
            {
                //case"U":
                case "Q":
                    liquestions.Visible = true;
                    liSInterview.Visible = false;
                    liHInterview.Visible = false;
                    break;
                case "C":
                case "A":
                    liquestions.Visible = false;
                    liSInterview.Visible = true;
                    liHInterview.Visible = true;
                    break;
                case "S":
                    liquestions.Visible = false;
                    liSInterview.Visible = true;
                    liSRecordPrint.Visible = false;
                    liSVote.Visible = false;
                    liHInterview.Visible = false;
                    break;
                default:
                    break;
            }
        }
    }
}
